<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Unsafe #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_HADDOCK not-home #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  GHC.Pack</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 1997-2002</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  cvs-ghc@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  non-portable (GHC Extensions)</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- This module provides a small set of low-level functions for packing</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- and unpacking a chunk of bytes. Used by code emitted by the compiler</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- plus the prelude libraries.</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- The programmer level view of packed strings is provided by a GHC</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- system library PackedString.</span><span>
</span><span id="line-21"></span><span class="hs-comment">--</span><span>
</span><span id="line-22"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Pack</span><span>
</span><span id="line-25"></span><span>       </span><span class="hs-special">(</span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-comment">-- (**) - emitted by compiler.</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Pack.html#packCString%23"><span class="hs-identifier">packCString#</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Pack.html#unpackCString"><span class="hs-identifier">unpackCString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="../../ghc-prim/src/GHC.CString.html#unpackCString%23"><span class="hs-identifier">unpackCString#</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="../../ghc-prim/src/GHC.CString.html#unpackNBytes%23"><span class="hs-identifier">unpackNBytes#</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="../../ghc-prim/src/GHC.CString.html#unpackFoldrCString%23"><span class="hs-identifier">unpackFoldrCString#</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- (**)</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="../../ghc-prim/src/GHC.CString.html#unpackAppendCString%23"><span class="hs-identifier">unpackAppendCString#</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- (**)</span><span>
</span><span id="line-34"></span><span>       </span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.List.html#length"><span class="hs-identifier">length</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.ST.html"><span class="hs-identifier">GHC.ST</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Ptr.html"><span class="hs-identifier">GHC.Ptr</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">data</span><span> </span><span id="ByteArray"><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-var">ByteArray</span></a></span></span><span> </span><span id="local-6989586621679562290"><span class="annot"><a href="#local-6989586621679562290"><span class="hs-identifier hs-type">ix</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span id="ByteArray"><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-var">ByteArray</span></a></span></span><span>        </span><span class="annot"><a href="#local-6989586621679562290"><span class="hs-identifier hs-type">ix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562290"><span class="hs-identifier hs-type">ix</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">data</span><span> </span><span id="MutableByteArray"><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-var">MutableByteArray</span></a></span></span><span> </span><span id="local-6989586621679562296"><span class="annot"><a href="#local-6989586621679562296"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679562297"><span class="annot"><a href="#local-6989586621679562297"><span class="hs-identifier hs-type">ix</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="MutableByteArray"><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-var">MutableByteArray</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679562297"><span class="hs-identifier hs-type">ix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562297"><span class="hs-identifier hs-type">ix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562296"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span id="local-6989586621679562334"><span class="annot"><a href="GHC.Pack.html#unpackCString"><span class="hs-identifier hs-type">unpackCString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562334"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-46"></span><span id="unpackCString"><span class="annot"><span class="annottext">unpackCString :: forall a. Ptr a -&gt; [Char]
</span><a href="GHC.Pack.html#unpackCString"><span class="hs-identifier hs-var hs-var">unpackCString</span></a></span></span><span> </span><span id="local-6989586621679562280"><span class="annot"><span class="annottext">a :: Ptr a
</span><a href="#local-6989586621679562280"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span id="local-6989586621679562278"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679562278"><span class="hs-identifier hs-var">addr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679562280"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; Ptr a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
forall a. Ptr a
</span><a href="GHC.Ptr.html#nullPtr"><span class="hs-identifier hs-var">nullPtr</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; [Char]
</span><a href="../../ghc-prim/src/GHC.CString.html#unpackCString%23"><span class="hs-identifier hs-var">unpackCString#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679562278"><span class="hs-identifier hs-var">addr</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="annot"><a href="GHC.Pack.html#packCString%23"><span class="hs-identifier hs-type">packCString#</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span>
</span><span id="line-51"></span><span id="packCString%23"><span class="annot"><span class="annottext">packCString# :: [Char] -&gt; ByteArray#
</span><a href="GHC.Pack.html#packCString%23"><span class="hs-identifier hs-var hs-var">packCString#</span></a></span></span><span> </span><span id="local-6989586621679562276"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562276"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; ByteArray Int
</span><a href="GHC.Pack.html#packString"><span class="hs-identifier hs-var">packString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562276"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-type">ByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679562274"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679562274"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679562274"><span class="hs-identifier hs-var">bytes</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="annot"><a href="GHC.Pack.html#packString"><span class="hs-identifier hs-type">packString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-type">ByteArray</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-54"></span><span id="packString"><span class="annot"><span class="annottext">packString :: [Char] -&gt; ByteArray Int
</span><a href="GHC.Pack.html#packString"><span class="hs-identifier hs-var hs-var">packString</span></a></span></span><span> </span><span id="local-6989586621679562273"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562273"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. ST s (ByteArray Int)) -&gt; ByteArray Int
forall a. (forall s. ST s a) -&gt; a
</span><a href="GHC.ST.html#runST"><span class="hs-identifier hs-var">runST</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; ST s (ByteArray Int)
forall s. [Char] -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#packStringST"><span class="hs-identifier hs-var">packStringST</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562273"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span id="local-6989586621679562323"><span class="annot"><a href="GHC.Pack.html#packStringST"><span class="hs-identifier hs-type">packStringST</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562323"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-type">ByteArray</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-57"></span><span id="packStringST"><span class="annot"><span class="annottext">packStringST :: forall s. [Char] -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#packStringST"><span class="hs-identifier hs-var hs-var">packStringST</span></a></span></span><span> </span><span id="local-6989586621679562270"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562270"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679562269"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679562269"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Int
forall a. [a] -&gt; Int
</span><a href="GHC.List.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562270"><span class="hs-identifier hs-var">str</span></a></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-59"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; [Char] -&gt; ST s (ByteArray Int)
forall s. Int -&gt; [Char] -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#packNBytesST"><span class="hs-identifier hs-var">packNBytesST</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679562269"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562270"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span id="local-6989586621679562320"><span class="annot"><a href="GHC.Pack.html#packNBytesST"><span class="hs-identifier hs-type">packNBytesST</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562320"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-type">ByteArray</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-62"></span><span id="packNBytesST"><span class="annot"><span class="annottext">packNBytesST :: forall s. Int -&gt; [Char] -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#packNBytesST"><span class="hs-identifier hs-var hs-var">packNBytesST</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679562264"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562264"><span class="hs-identifier hs-var">length#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679562263"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562263"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-comment">{-
   allocate an array that will hold the string
   (not forgetting the NUL byte at the end)
  -}</span><span>
</span><span id="line-67"></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; ST s (MutableByteArray s Int)
forall s. Int# -&gt; ST s (MutableByteArray s Int)
</span><a href="GHC.Pack.html#new_ps_array"><span class="hs-identifier hs-var">new_ps_array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562264"><span class="hs-identifier hs-var">length#</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ST s (MutableByteArray s Int)
-&gt; (MutableByteArray s Int -&gt; ST s (ByteArray Int))
-&gt; ST s (ByteArray Int)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679562261"><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562261"><span class="hs-identifier hs-var">ch_array</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-68"></span><span>   </span><span class="hs-comment">-- fill in packed string from &quot;str&quot;</span><span>
</span><span id="line-69"></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int -&gt; Int# -&gt; [Char] -&gt; ST s ()
forall s. MutableByteArray s Int -&gt; Int# -&gt; [Char] -&gt; ST s ()
</span><a href="#local-6989586621679562260"><span class="hs-identifier hs-var">fill_in</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562261"><span class="hs-identifier hs-var">ch_array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562263"><span class="hs-identifier hs-var">str</span></a></span><span>   </span><span class="annot"><span class="annottext">ST s () -&gt; ST s (ByteArray Int) -&gt; ST s (ByteArray Int)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-70"></span><span>   </span><span class="hs-comment">-- freeze the puppy:</span><span>
</span><span id="line-71"></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int -&gt; Int# -&gt; ST s (ByteArray Int)
forall s. MutableByteArray s Int -&gt; Int# -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#freeze_ps_array"><span class="hs-identifier hs-var">freeze_ps_array</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562261"><span class="hs-identifier hs-var">ch_array</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562264"><span class="hs-identifier hs-var">length#</span></a></span><span>
</span><span id="line-72"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-73"></span><span>  </span><span id="local-6989586621679562312"><span class="annot"><a href="#local-6989586621679562260"><span class="hs-identifier hs-type">fill_in</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562312"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562312"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-74"></span><span>  </span><span id="local-6989586621679562260"><span class="annot"><span class="annottext">fill_in :: forall s. MutableByteArray s Int -&gt; Int# -&gt; [Char] -&gt; ST s ()
</span><a href="#local-6989586621679562260"><span class="hs-identifier hs-var hs-var">fill_in</span></a></span></span><span> </span><span id="local-6989586621679562255"><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562255"><span class="hs-identifier hs-var">arr_in#</span></a></span></span><span> </span><span id="local-6989586621679562254"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562254"><span class="hs-identifier hs-var">idx</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-75"></span><span>   </span><span class="annot"><span class="annottext">MutableByteArray s Int -&gt; Int# -&gt; Char# -&gt; ST s ()
forall s. MutableByteArray s Int -&gt; Int# -&gt; Char# -&gt; ST s ()
</span><a href="GHC.Pack.html#write_ps_array"><span class="hs-identifier hs-var">write_ps_array</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562255"><span class="hs-identifier hs-var">arr_in#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562254"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier hs-var">chr#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ST s () -&gt; ST s () -&gt; ST s ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-76"></span><span>   </span><span class="annot"><span class="annottext">() -&gt; ST s ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>  </span><span class="annot"><a href="#local-6989586621679562260"><span class="hs-identifier hs-var">fill_in</span></a></span><span> </span><span id="local-6989586621679562252"><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562252"><span class="hs-identifier hs-var">arr_in#</span></a></span></span><span> </span><span id="local-6989586621679562251"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562251"><span class="hs-identifier hs-var">idx</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-type">C#</span></a></span><span> </span><span id="local-6989586621679562250"><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679562250"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679562249"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562249"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-79"></span><span>   </span><span class="annot"><span class="annottext">MutableByteArray s Int -&gt; Int# -&gt; Char# -&gt; ST s ()
forall s. MutableByteArray s Int -&gt; Int# -&gt; Char# -&gt; ST s ()
</span><a href="GHC.Pack.html#write_ps_array"><span class="hs-identifier hs-var">write_ps_array</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562252"><span class="hs-identifier hs-var">arr_in#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562251"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679562250"><span class="hs-identifier hs-var">c</span></a></span><span>  </span><span class="annot"><span class="annottext">ST s () -&gt; ST s () -&gt; ST s ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-80"></span><span>   </span><span class="annot"><span class="annottext">MutableByteArray s Int -&gt; Int# -&gt; [Char] -&gt; ST s ()
forall s. MutableByteArray s Int -&gt; Int# -&gt; [Char] -&gt; ST s ()
</span><a href="#local-6989586621679562260"><span class="hs-identifier hs-var">fill_in</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray s Int
</span><a href="#local-6989586621679562252"><span class="hs-identifier hs-var">arr_in#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562251"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679562249"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- (Very :-) ``Specialised'' versions of some CharArray things...</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span id="local-6989586621679562316"><span class="annot"><a href="GHC.Pack.html#new_ps_array"><span class="hs-identifier hs-type">new_ps_array</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562316"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562316"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-85"></span><span id="local-6989586621679562307"><span class="annot"><a href="GHC.Pack.html#write_ps_array"><span class="hs-identifier hs-type">write_ps_array</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562307"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Char%23"><span class="hs-identifier hs-type">Char#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562307"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-86"></span><span id="local-6989586621679562309"><span class="annot"><a href="GHC.Pack.html#freeze_ps_array"><span class="hs-identifier hs-type">freeze_ps_array</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562309"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679562309"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-type">ByteArray</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span id="new_ps_array"><span class="annot"><span class="annottext">new_ps_array :: forall s. Int# -&gt; ST s (MutableByteArray s Int)
</span><a href="GHC.Pack.html#new_ps_array"><span class="hs-identifier hs-var hs-var">new_ps_array</span></a></span></span><span> </span><span id="local-6989586621679562248"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562248"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STRep s (MutableByteArray s Int) -&gt; ST s (MutableByteArray s Int)
forall s a. STRep s a -&gt; ST s a
</span><a href="GHC.ST.html#ST"><span class="hs-identifier hs-var">ST</span></a></span><span> </span><span class="annot"><span class="annottext">(STRep s (MutableByteArray s Int) -&gt; ST s (MutableByteArray s Int))
-&gt; STRep s (MutableByteArray s Int)
-&gt; ST s (MutableByteArray s Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679562246"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562246"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-89"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; State# s -&gt; (# State# s, MutableByteArray# s #)
forall d. Int# -&gt; State# d -&gt; (# State# d, MutableByteArray# d #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#newByteArray%23"><span class="hs-identifier hs-var">newByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562248"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562246"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679562245"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562245"><span class="hs-identifier hs-var">s2#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679562244"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562244"><span class="hs-identifier hs-var">barr#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562245"><span class="hs-identifier hs-var">s2#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; MutableByteArray# s -&gt; MutableByteArray s Int
forall s ix.
ix -&gt; ix -&gt; MutableByteArray# s -&gt; MutableByteArray s ix
</span><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-var">MutableByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
forall {a}. a
</span><a href="#local-6989586621679562243"><span class="hs-identifier hs-var">bot</span></a></span><span> </span><span class="annot"><span class="annottext">Int
forall {a}. a
</span><a href="#local-6989586621679562243"><span class="hs-identifier hs-var">bot</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562244"><span class="hs-identifier hs-var">barr#</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-91"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-92"></span><span>    </span><span id="local-6989586621679562243"><span class="annot"><span class="annottext">bot :: a
</span><a href="#local-6989586621679562243"><span class="hs-identifier hs-var hs-var">bot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;new_ps_array&quot;</span></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span id="write_ps_array"><span class="annot"><span class="annottext">write_ps_array :: forall s. MutableByteArray s Int -&gt; Int# -&gt; Char# -&gt; ST s ()
</span><a href="GHC.Pack.html#write_ps_array"><span class="hs-identifier hs-var hs-var">write_ps_array</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679562241"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562241"><span class="hs-identifier hs-var">barr#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679562240"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562240"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679562239"><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679562239"><span class="hs-identifier hs-var">ch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STRep s () -&gt; ST s ()
forall s a. STRep s a -&gt; ST s a
</span><a href="GHC.ST.html#ST"><span class="hs-identifier hs-var">ST</span></a></span><span> </span><span class="annot"><span class="annottext">(STRep s () -&gt; ST s ()) -&gt; STRep s () -&gt; ST s ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679562238"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562238"><span class="hs-identifier hs-var">s#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-95"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Int# -&gt; Char# -&gt; State# s -&gt; State# s
forall d.
MutableByteArray# d -&gt; Int# -&gt; Char# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeCharArray%23"><span class="hs-identifier hs-var">writeCharArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562241"><span class="hs-identifier hs-var">barr#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562240"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679562239"><span class="hs-identifier hs-var">ch</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562238"><span class="hs-identifier hs-var">s#</span></a></span><span>  </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679562237"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562237"><span class="hs-identifier hs-var">s2#</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562237"><span class="hs-identifier hs-var">s2#</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- same as unsafeFreezeByteArray</span><span>
</span><span id="line-99"></span><span id="freeze_ps_array"><span class="annot"><span class="annottext">freeze_ps_array :: forall s. MutableByteArray s Int -&gt; Int# -&gt; ST s (ByteArray Int)
</span><a href="GHC.Pack.html#freeze_ps_array"><span class="hs-identifier hs-var hs-var">freeze_ps_array</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Pack.html#MutableByteArray"><span class="hs-identifier hs-type">MutableByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679562234"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562234"><span class="hs-identifier hs-var">arr#</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679562233"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562233"><span class="hs-identifier hs-var">len#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STRep s (ByteArray Int) -&gt; ST s (ByteArray Int)
forall s a. STRep s a -&gt; ST s a
</span><a href="GHC.ST.html#ST"><span class="hs-identifier hs-var">ST</span></a></span><span> </span><span class="annot"><span class="annottext">(STRep s (ByteArray Int) -&gt; ST s (ByteArray Int))
-&gt; STRep s (ByteArray Int) -&gt; ST s (ByteArray Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679562232"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562232"><span class="hs-identifier hs-var">s#</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-100"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; State# s -&gt; (# State# s, ByteArray# #)
forall d.
MutableByteArray# d -&gt; State# d -&gt; (# State# d, ByteArray# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#unsafeFreezeByteArray%23"><span class="hs-identifier hs-var">unsafeFreezeByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679562234"><span class="hs-identifier hs-var">arr#</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562232"><span class="hs-identifier hs-var">s#</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679562231"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562231"><span class="hs-identifier hs-var">s2#</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679562230"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679562230"><span class="hs-identifier hs-var">frozen#</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-101"></span><span>    </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679562231"><span class="hs-identifier hs-var">s2#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; ByteArray# -&gt; ByteArray Int
forall ix. ix -&gt; ix -&gt; ByteArray# -&gt; ByteArray ix
</span><a href="GHC.Pack.html#ByteArray"><span class="hs-identifier hs-var">ByteArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679562233"><span class="hs-identifier hs-var">len#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679562230"><span class="hs-identifier hs-var">frozen#</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-102"></span></pre></body></html>